<template>
  <!-- html代码必须放在容器里面 -->
    <div>
      <span>用户名:{{$route.query.userName}}</span>
      <span class="myFont">{{info}}</span>
      <img src="../assets/logo.png">
      
      <!-- 声明式导航，页面跳转 -->
      <router-link :to="{name:'Login'}">退出到登录页面</router-link>
      
    </div>

</template>

<script>
  /* 导入关键字*/
    export default{
           name:"hello",//描述组件名
           data(){
             return{
               info:"hello world"
             }
           },
           mounted() {//挂载函数
             //获取路由跳转传来的值
             var name = this.$route.query.userName;
             console.log(name);
           }
    }
</script>

<style>
  @import url("../assets/css/test.css");
</style>
